#app {
  .big-logo{
    width: 100px;
    height: 100px;
    background: #387AFF;
    border-radius: 0px 0px 0px 0px;
    display: flex;
    justify-content: center;
    align-items: center;
    .small-logo{
      // 禁止拖拽下载
      pointer-events: none;
      user-select: none;
    }
   }
   .bg-container{
    background: url("../assets/index/bg.png");
    background-size: 100% 100%;
    // padding: 20px;
    overflow-y: auto; /* 确保内容可以滚动 */
    height: calc(100vh - 100px); /* 除去导航栏的高度 */
    position: relative; /* 作为参考点 */
   }
  .main-container {
    min-height: 100%;
    transition: margin-left .28s;
    margin-left: $sideBarWidth;
    position: relative;
    .contents{
      // background: linear-gradient( #EDF6FF 0%, #FFFFFF 19%);
      box-shadow: 0px 2px 8px 0px rgba(121,141,183,0.2), inset 0px 0px 2px 0px #CDE4FF;
      border-radius: 4px 4px 4px 4px;
      border: 1px solid #FFFFFF;
    }
    .fixed-header {
      position: fixed !important;
      top: 0;
      right: 0;
      z-index: 9;
      width: calc(100% - #{$sideBarWidth});
      transition: width 0.28s;
    }
  }

  .sidebar-container {
    transition: width 0.28s;
    width: $sideBarWidth !important;
    background-color: $menuBg;
    height: 100%;
    position: fixed;
    font-size: 0px;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1001;
    overflow: hidden;
    // border-right: 1px solid red !important;
    box-shadow: 0px 2px 8px 0px rgba(121,141,183,0.2), inset 0px 0px 2px 0px #CDE4FF;

    // reset element-ui css
    .horizontal-collapse-transition {
      transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
    }

    .scrollbar-wrapper {
      overflow-x: hidden !important;
      margin-top: 40px;
    }

    .el-scrollbar__bar.is-vertical {
      right: 0px;
    }

    .el-scrollbar {
      height: 100%;
    }

    &.has-logo {
      .el-scrollbar {
        height: calc(100% - 50px);
      }
    }

    .is-horizontal {
      display: none;
    }
     
    a {
      display: inline-block;
      width: 100%;
      overflow: hidden;
    }

    .svg-icon {
      // margin-right: 16px;
      background-color: #fff;
    }

    // .sub-el-icon {
    //   margin-right: 12px;
    //   margin-left: -2px;
    // }

    .el-menu {
      border: none;
      height: 100%;
      width: 100% !important;
    }

    // menu hover
    .submenu-title-noDropdown,
    .el-submenu__title {
      display: flex;
      flex-direction: column; // Align icon and text vertically
      justify-content: center; // Center content vertically
      align-items: center; // Center content horizontally
      // background-color: antiquewhite !important;
      height: 92px;
      position: relative;
      margin: 10px 0;
      &:hover {
        // background-color: $menuHover !important;
      background: linear-gradient(
        to right,
        #dae2f7 0,
        rgba(205, 222, 255, 0.16) 80%
      ) !important;
      }
      img{
        width: 42px;
        height: 42px;
      }
      span{
        color: rgba(62,70,84,0.6);
        text-align: center;
        font-size: 18px;
        // height: 24px;
        width: 80px;
        line-height: 21px;
        font-weight: 600;
      }
    }
    .submenu-title-noDropdown.is-active{

      background: linear-gradient(
        to right,
        #dae2f7 0,
        rgba(205, 222, 255, 0.16) 80%
      ) !important;
    }
    .submenu-title-noDropdown.is-active::before {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      right: calc(96% - 1px);
      bottom: 0;
      background-color: #3979ff;
      
    }

    .el-submenu.is-active>.el-submenu__title span {
      color: $subMenuActiveText !important;
    }
    .el-menu-item.is-active span {
      color: $subMenuActiveText !important;
    }

    & .nest-menu .el-submenu>.el-submenu__title,
    & .el-submenu .el-menu-item {
      min-width: $sideBarWidth !important;
      background-color: $subMenuBg !important;

      &:hover {
        background-color: $subMenuHover !important;
        
      }
    }
  }

  .hideSidebar {
    .sidebar-container {
      width: 54px !important;
    }

    .main-container {
      margin-left: 54px;
    }

    .submenu-title-noDropdown {
      padding: 0 !important;
      position: relative;

      .el-tooltip {
        padding: 0 !important;

        .svg-icon {
          margin-left: 20px;
        }

        .sub-el-icon {
          margin-left: 19px;
        }
      }
    }

    .el-submenu {
      overflow: hidden;

      &>.el-submenu__title {
        padding: 0 !important;

        .svg-icon {
          margin-left: 20px;
        }

        .sub-el-icon {
          margin-left: 19px;
        }

        .el-submenu__icon-arrow {
          display: none;
        }
      }
    }

    .el-menu--collapse {
      .el-submenu {
        &>.el-submenu__title {
          &>span {
            height: 0;
            width: 0;
            overflow: hidden;
            visibility: hidden;
            display: inline-block;
          }
        }
      }
    }
  }

  .el-menu--collapse .el-menu .el-submenu {
    min-width: $sideBarWidth !important;
  }

  // mobile responsive
  .mobile {
    .main-container {
      margin-left: 0px;
    }

    .sidebar-container {
      transition: transform .28s;
      width: $sideBarWidth !important;
    }

    &.hideSidebar {
      .sidebar-container {
        pointer-events: none;
        transition-duration: 0.3s;
        transform: translate3d(-$sideBarWidth, 0, 0);
      }
    }
  }

  .withoutAnimation {

    .main-container,
    .sidebar-container {
      transition: none;
    }
  }
}

// when menu collapsed
.el-menu--vertical {
  &>.el-menu {
    .svg-icon {
      margin-right: 16px;
    }
    .sub-el-icon {
      margin-right: 12px;
      margin-left: -2px;
    }
  }

  .nest-menu .el-submenu>.el-submenu__title,
  .el-menu-item {
    &:hover {
      // you can use $subMenuHover
      background-color: $menuHover !important;
    }
  }

  // the scroll bar appears when the subMenu is too long
  >.el-menu--popup {
    max-height: 100vh;
    overflow-y: auto;

    &::-webkit-scrollbar-track-piece {
      background: #d3dce6;
    }

    &::-webkit-scrollbar {
      width: 6px;
    }

    &::-webkit-scrollbar-thumb {
      background: #99a9bf;
      border-radius: 20px;
    }
  }
}
